package com.jboost.modules.app.constant;

import com.jboost.common.util.DateUtils;

import java.util.Date;

public class TokenDto {
    String type = "sso_res";
    String username;
    String iss;
    String aud = "com.jiandaoyun";
    Long nbf;
    Long iat;
    Long exp;

    String redirect_uri;

    public String getRedirect_uri() {
        return redirect_uri;
    }

    public void setRedirect_uri(String redirect_uri) {
        this.redirect_uri = redirect_uri;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIss() {
        return iss;
    }

    public void setIss(String iss) {
        this.iss = iss;
    }

    public String getAud() {
        return aud;
    }

    public void setAud(String aud) {
        this.aud = aud;
    }

    public Long getNbf() {
        return nbf;
    }

    public void setNbf(Long nbf) {
        this.nbf = nbf;
    }

    public Long getIat() {
        return System.currentTimeMillis();
    }

    public void setIat(Long iat) {
        this.iat = iat;
    }

    public Long getExp() {
        return System.currentTimeMillis() + DateUtils.addDays(new Date(),30).getTime();
    }

    public void setExp(Long exp) {
        this.exp = exp;
    }
}
